/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.playground.core.entity.boardgame.tictactoe;

import com.playground.core.entity.boardgame.Square;

/**
 *
 * @author Cleber
 */
public class TicTacToeSquare extends Square {

    public TicTacToeSquare(int position) {
        super(position);
    }

    public TicTacToeSquare(int row, int column) {
        super(3 * row + column);
    }

    /**
     * @return the row in the board where this square is placed
     */
    public int getRow() {
        return getPosition() / 3;
    }

    /**
     * @return the column in the board where this square is placed
     */
    public int getColumn() {
        return getPosition() % 3;
    }
}
